/**
 * Console.log 优化工具
 * 用于批量替换项目中的console.log语句为统一的日志工具
 */

import { createLogger } from './logger';

// 为未设置模块名的console.log创建通用logger
const genericLogger = createLogger('Generic');

// 导出便于在组件中直接替换使用的logger实例
export const componentLogger = (name) => createLogger(name);

// 便于快速替换的调试函数映射
export const debugLog = (...args) => genericLogger.debug(...args);
export const infoLog = (...args) => genericLogger.info(...args);
export const warnLog = (...args) => genericLogger.warn(...args);
export const errorLog = (...args) => genericLogger.error(...args);

// 兼容原有console.log的映射 - 开发环境显示，生产环境隐藏
export const log = (...args) => genericLogger.log(...args); 